package cn.yedong.pet.service;

import cn.yedong.basic.util.AjaxResult;
import cn.yedong.basic.util.QueryResult;
import cn.yedong.pet.domain.SearchMasterMsg;
import cn.yedong.basic.service.IBaseService;
import cn.yedong.pet.dto.MsgDto;
import cn.yedong.pet.query.SearchMasterMsgQuery;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yedong
 * @since 2023-02-19
 */
public interface ISearchMasterMsgService extends IBaseService<SearchMasterMsg> {
    //发布寻主消息
    AjaxResult publish(SearchMasterMsg msg, HttpServletRequest request);
    //用户查询自己所有的寻主消息 - 不用区分状态
    QueryResult<SearchMasterMsg> user(SearchMasterMsgQuery query, HttpServletRequest request);
    //管理员查询已完成的寻主消息 - 要区分平台管理员和店铺管理员
    QueryResult<SearchMasterMsg> finish(SearchMasterMsgQuery query, HttpServletRequest request);
    //管理员查询已放入寻主池的寻主消息
    QueryResult<SearchMasterMsg> toSearchMasterPool(SearchMasterMsgQuery query, HttpServletRequest request);
    //管理员查询待处理寻主消息 - 要区分平台管理员和店铺管理员
    QueryResult<SearchMasterMsg> toHandle(SearchMasterMsgQuery query, HttpServletRequest request);
    //拒单
    void reject(Long id);
    //接单
    void accept(MsgDto msgDto);
}
